home *** CD-ROM | disk | FTP | other *** search
/ Clickx 75 / Clickx 75.iso / software / expressionweb / expressionwebv3 / ExpressionWeb_en.exe / Setup / WeLocen.cab / xWeb.FPEDSAT.dll.en / HTML / 537 < prev    next >
Encoding:
Extensible Markup Language  |  2009-07-15  |  36.5 KB  |  1,074 lines

  1.  
  2. <xsl:stylesheet 
  3.     xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  4.     xmlns:msxsl="urn:schemas-microsoft-com:xslt" 
  5.     xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
  6.     xmlns:out="urn:sample"
  7.     xmlns:outscr="urn:twiddle"
  8.     exclude-result-prefixes="xsl msxsl"
  9.     version="1.0">
  10. <xsl:output method="xml" indent="yes" encoding="utf-8" omit-xml-declaration="yes" />
  11. <xsl:preserve-space elements="*"/>
  12. <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
  13. <xsl:namespace-alias stylesheet-prefix="outscr" result-prefix="msxsl"/>
  14.  
  15. <!-- params designed to be overridden by the caller -->
  16. <xsl:param name="ID">1</xsl:param>
  17. <xsl:param name="TopLevel">1</xsl:param>
  18. <xsl:param name="FrameworkOnly">0</xsl:param>
  19. <xsl:param name="NonWSSViewOnly">0</xsl:param>
  20. <xsl:param name="ViewSpec">
  21.     <View>
  22.         <RowPath>/catalog/book</RowPath>
  23.         <Fields>
  24.             <Field FName="fld_1" Value="title" Title="title" Type="text"/>
  25.             <Field FName="fld_2" Value="author" Title="author" Type="text"/>
  26.             <Field FName="fld_3" Value="genre" Title="genre" Type="text"/>
  27.         </Fields>
  28.     </View>
  29. </xsl:param>
  30. <xsl:param name="StyleName">Table</xsl:param>
  31. <xsl:param name="ShowToolbar">0</xsl:param>
  32. <xsl:param name="DoXSLPaging">1</xsl:param>
  33. <xsl:param name="UsePaging">0</xsl:param>
  34. <xsl:param name="RowLimit">100</xsl:param>
  35. <xsl:param name="ShowHeader">0</xsl:param>
  36. <xsl:param name="ShowFooter">0</xsl:param>
  37. <xsl:param name="DoXSLJoin">0</xsl:param>
  38.  
  39. <!-- all localized text params -->
  40. <xsl:param name="ViewEmptyText">There are no items to display in this view.</xsl:param>
  41. <xsl:param name="ChooseText">Choose one...</xsl:param>
  42. <xsl:param name="PreviousLinkText">Previous</xsl:param>
  43. <xsl:param name="NextLinkText">Next</xsl:param>
  44. <xsl:param name="FirstLinkText">First</xsl:param>
  45. <xsl:param name="PageItemsText">Items</xsl:param>
  46. <xsl:param name="CountText">Count</xsl:param>
  47. <xsl:param name="AscendingText">Ascending</xsl:param>
  48. <xsl:param name="DescendingText">Descending</xsl:param>
  49. <xsl:param name="FilterText">Filter</xsl:param>
  50. <xsl:param name="YesText">Yes</xsl:param>
  51. <xsl:param name="NoText">No</xsl:param>
  52. <xsl:param name="EmptyOptionText">(Empty)</xsl:param>
  53. <xsl:param name="AllOptionText">(All)</xsl:param>
  54. <xsl:param name="DefaultLCID">1033</xsl:param>
  55. <xsl:param name="DefaultDateFormat">5</xsl:param>
  56. <xsl:param name="DefaultNumberFormat">#,##0.##;-#,##0.##</xsl:param>
  57.  
  58. <!-- global variables -->
  59. <xsl:variable name="basename" select="concat('dvt_',$ID)" />
  60. <xsl:variable name="View" select="msxsl:node-set($ViewSpec)/View" />
  61. <xsl:variable name="Style" select="/ViewStyles/Style[ID=$StyleName]" />
  62. <xsl:variable name="Defaults" select="/ViewStyles/Defaults" />
  63.  
  64. <xsl:template match="/">
  65.     <xsl:choose>
  66.         <xsl:when test="$FrameworkOnly = 1">
  67.             <out:stylesheet version="1.0" 
  68.                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  69.                 xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
  70.                 xmlns:msxsl="urn:schemas-microsoft-com:xslt"
  71.                 exclude-result-prefixes="xsl ddwrt msxsl">
  72.             <out:output method="html" indent="no"/>
  73.             <out:decimal-format NaN=""/>
  74.  
  75.             <xsl:call-template name="gen-dvt-framework" />
  76.  
  77.             </out:stylesheet>
  78.         </xsl:when>
  79.         <xsl:when test="$NonWSSViewOnly = 1">
  80.             <xsl:choose>
  81.                 <xsl:when test="$TopLevel = 1">
  82.                     <out:stylesheet version="1.0" 
  83.                         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  84.                         xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
  85.                         xmlns:msxsl="urn:schemas-microsoft-com:xslt"
  86.                         exclude-result-prefixes="xsl ddwrt msxsl">
  87.  
  88.                     <xsl:call-template name="gen-dvt-framework" />
  89.  
  90.                     <out:template match="/">
  91.                         <out:call-template name="{$basename}"/>
  92.                     </out:template>
  93.                     <xsl:apply-templates select="$Style" />
  94.                     </out:stylesheet>
  95.                 </xsl:when>
  96.                 <xsl:otherwise>
  97.                     <xsl:apply-templates select="$Style" />
  98.                 </xsl:otherwise>
  99.             </xsl:choose>
  100.         </xsl:when>
  101.         <xsl:when test="$TopLevel = 1">
  102.             <out:stylesheet version="1.0" 
  103.                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  104.                 xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
  105.                 xmlns:msxsl="urn:schemas-microsoft-com:xslt"
  106.                 exclude-result-prefixes="xsl ddwrt msxsl">
  107.             <out:output method="html" indent="no"/>
  108.  
  109.             <xsl:call-template name="gen-dvt-framework" />
  110.  
  111.             <out:template match="/">
  112.                 <out:call-template name="{$basename}"/>
  113.             </out:template>
  114.             <xsl:apply-templates select="$Style" />
  115.             </out:stylesheet>
  116.         </xsl:when>
  117.         <xsl:otherwise>
  118.             <xsl:apply-templates select="$Style" />
  119.         </xsl:otherwise>
  120.     </xsl:choose>
  121. </xsl:template>
  122.  
  123. <xsl:template name="gen-dvt-framework">
  124.  
  125. <!-- BEGIN: params set by runtime -->
  126.  
  127. <out:param name="dvt_adhocmode"></out:param>
  128. <out:param name="dvt_adhocfiltermode">xsl</out:param>
  129. <out:param name="dvt_fieldsort"></out:param>
  130. <out:param name="dvt_sortfield"></out:param>
  131. <out:param name="dvt_groupfield"></out:param>
  132. <out:param name="dvt_groupdisplay"></out:param>
  133. <out:param name="dvt_sortdir">ascending</out:param>
  134. <out:param name="dvt_groupdir">ascending</out:param>
  135. <out:param name="dvt_grouptype"></out:param>
  136. <out:param name="dvt_sorttype">text</out:param>
  137. <out:param name="dvt_groupsorttype">text</out:param>
  138. <out:param name="dvt_filterfield"></out:param>
  139. <out:param name="dvt_filterval"></out:param>
  140. <out:param name="dvt_filtertype"></out:param>
  141. <out:param name="dvt_firstrow">1</out:param>
  142. <out:param name="dvt_nextpagedata"></out:param>
  143. <out:param name="dvt_apos">'</out:param>
  144.  
  145. <!-- o11 #327468: always add a sample param -->
  146. <out:param name="filterParam"></out:param>
  147.  
  148. <!-- END: params set by runtime -->
  149.  
  150. <!-- generic template to display a header field -->
  151. <out:template name="dvt.headerfield">
  152. <out:param name="fieldname"/>
  153. <out:param name="fieldtitle"/>
  154. <out:param name="sortable">1</out:param>
  155. <out:param name="attachments">0</out:param>
  156. <out:choose>
  157. <out:when test="($dvt_adhocmode = 'sort' or $dvt_fieldsort = '1') and $sortable='1'">
  158. <out:variable name="sortfield">
  159.     <out:choose>
  160.         <out:when test="substring($fieldname, string-length($fieldname) - 5) = '(text)'">
  161.             <out:value-of select="substring($fieldname, 1, string-length($fieldname) - 6)"/>
  162.         </out:when>
  163.         <out:when test="substring($fieldname, 1, 1) = '@'">
  164.             <out:value-of select="substring($fieldname, 2)"/>
  165.         </out:when>
  166.         <out:otherwise>
  167.             <out:value-of select="$fieldname"/>
  168.         </out:otherwise>
  169.     </out:choose>
  170. </out:variable>
  171. <out:variable name="linkdir">
  172.     <out:choose>
  173.         <out:when test="$dvt_sortfield = $sortfield and $dvt_sortdir = 'ascending'">descending</out:when>
  174.         <out:otherwise>ascending</out:otherwise>
  175.     </out:choose>
  176. </out:variable>
  177. <out:variable name="sortText">
  178.     <out:choose>
  179.         <out:when test="$linkdir='descending'">' + 'descending' + '</out:when>
  180.         <out:otherwise>' + 'ascending' + '</out:otherwise>
  181.     </out:choose>
  182. </out:variable>
  183. <a>
  184.     <out:attribute name="href">javascript: <out:value-of select="ddwrt:GenFireServerEvent(concat('dvt_sortfield={{',$sortfield,'}};dvt_sortdir={{',$sortText,'}}'))" />;</out:attribute>
  185.     <out:choose>
  186.         <out:when test="$attachments">
  187.             <out:value-of select="$fieldtitle" disable-output-escaping="yes"/>
  188.         </out:when>        
  189.         <out:otherwise>
  190.             <out:value-of select="$fieldtitle"/>
  191.         </out:otherwise>
  192.     </out:choose>
  193.     <out:if test="$dvt_sortfield = $sortfield">
  194.     <out:choose>
  195.         <out:when test="$dvt_sortdir = 'ascending'">
  196.             <img border="0" alt="{$AscendingText}" src="{{ddwrt:FieldSortImageUrl('Desc')}}" />
  197.         </out:when>
  198.         <out:when test="$dvt_sortdir = 'descending'">
  199.             <img border="0" alt="{$DescendingText}" src="{{ddwrt:FieldSortImageUrl('Asc')}}" />
  200.         </out:when>
  201.     </out:choose>
  202.     </out:if>
  203. </a>
  204. </out:when>
  205. <out:otherwise>
  206.     <out:choose>
  207.         <out:when test="$attachments">
  208.             <out:value-of select="$fieldtitle" disable-output-escaping="yes"/>
  209.         </out:when>        
  210.         <out:otherwise>
  211.             <out:value-of select="$fieldtitle"/>
  212.         </out:otherwise>
  213.     </out:choose>
  214. </out:otherwise>
  215. </out:choose>
  216. <out:if test="$dvt_filterfield=$fieldname" ddwrt:cf_ignore="1"><img alt="{$FilterText}" src="{{ddwrt:FieldFilterImageUrl('')}}"/></out:if>
  217. </out:template>
  218.  
  219. <!-- generic template to display a filter field -->
  220. <out:template name="dvt.filterfield">
  221. <out:param name="fieldname"/>
  222. <out:param name="fieldtitle"/>
  223. <out:param name="Rows" />
  224. <out:param name="fieldtype" />
  225. <out:variable name="fieldnamenoatsign" select="substring-after($fieldname, '@')"/>
  226. <out:variable name="filtertype"><out:if test="starts-with($fieldtype,'date')">date</out:if></out:variable>
  227. <out:variable name="sorttype"><out:choose><out:when test="starts-with($fieldtype,'number')">number</out:when><out:otherwise>text</out:otherwise></out:choose></out:variable>
  228. <out:variable name="clientText">' + this.options[this.selectedIndex].value + '</out:variable>
  229. <out:if test="not(contains($fieldname, '/')) and not(contains($fieldname, '['))" ddwrt:cf_ignore="1">
  230. <out:value-of select="$fieldtitle"/>
  231. <out:text disable-output-escaping="yes">:<br></out:text>
  232. <select name="{{$fieldname}}_filterval">
  233.     <out:attribute name="onchange">javascript: <out:value-of select="ddwrt:GenFireServerEvent(concat('NotUTF8;dvt_filterfield={{',$fieldname,'}};dvt_filtertype={{',$filtertype,'}};dvt_adhocmode={{false()}};dvt_filterval={{',$clientText,'}}'))" />;</out:attribute>
  234. <option value="##dvt_empty##">
  235.     <out:if test="$dvt_filterfield=$fieldname and $dvt_filterval=''">
  236.         <out:attribute name="selected">true</out:attribute>
  237.     </out:if>
  238.     <xsl:value-of select="$EmptyOptionText"/>
  239. </option>
  240. <option value="##dvt_all##">
  241.     <out:choose>
  242.         <out:when test="not($dvt_filterfield)">
  243.             <out:attribute name="selected">true</out:attribute>
  244.         </out:when>
  245.         <out:when test="$dvt_filterfield!=$fieldname">
  246.             <out:attribute name="selected">true</out:attribute>
  247.         </out:when>
  248.     </out:choose>
  249.     <xsl:value-of select="$AllOptionText"/>
  250. </option>
  251. <out:value-of select="ddwrt:NameChanged('',1)"/>
  252. <out:choose>
  253.     <out:when test="starts-with($fieldname, '@')">
  254.         <out:variable name="dvt_Rows">
  255.             <out:for-each select="$Rows">
  256.                 <out:sort select="@*[name()=$fieldname]" order="ascending" data-type="{{$sorttype}}"/>
  257.                 <out:copy-of select="." />
  258.             </out:for-each>
  259.         </out:variable>
  260.         <out:for-each select="msxsl:node-set($dvt_Rows)/*[not(@*[name()=$fieldnamenoatsign]=preceding-sibling::*[1]/@*[name()=$fieldnamenoatsign])]/@*[name()=$fieldnamenoatsign]">
  261.             <out:sort data-type="{{$sorttype}}" />
  262.             <out:call-template name="dvt.filteroption">
  263.                 <out:with-param name="name" select="$fieldname"/>
  264.                 <out:with-param name="value" select="."/>
  265.                 <out:with-param name="type" select="$fieldtype"/>
  266.             </out:call-template>
  267.         </out:for-each>
  268.     </out:when>
  269.     <out:when test="$fieldname = '.'">
  270.         <out:variable name="dvt_Rows">
  271.             <out:for-each select="$Rows">
  272.                 <out:sort select="." order="ascending" data-type="{{$sorttype}}"/>
  273.                 <out:copy-of select="." />
  274.             </out:for-each>
  275.         </out:variable>
  276.         <out:for-each select="msxsl:node-set($dvt_Rows)/*[not(.=preceding-sibling::*[1])]">
  277.             <out:sort data-type="{{$sorttype}}" />
  278.             <out:call-template name="dvt.filteroption">
  279.                 <out:with-param name="name" select="$fieldname"/>
  280.                 <out:with-param name="value" select="."/>
  281.                 <out:with-param name="type" select="$fieldtype"/>
  282.             </out:call-template>
  283.         </out:for-each>
  284.     </out:when>
  285.     <out:otherwise>
  286.         <out:variable name="dvt_Rows">
  287.             <out:for-each select="$Rows">
  288.                 <out:sort select="*[name()=$fieldname]" order="ascending" data-type="{{$sorttype}}"/>
  289.                 <out:copy-of select="." />
  290.             </out:for-each>
  291.         </out:variable>
  292.         <out:for-each select="msxsl:node-set($dvt_Rows)/*[not(*[name()=$fieldname]=preceding-sibling::*[1]/*[name()=$fieldname])]/*[name()=$fieldname]">
  293.             <out:sort data-type="{{$sorttype}}" />
  294.             <out:call-template name="dvt.filteroption">
  295.                 <out:with-param name="name" select="$fieldname"/>
  296.                 <out:with-param name="value" select="."/>
  297.                 <out:with-param name="type" select="$fieldtype"/>
  298.             </out:call-template>
  299.         </out:for-each>
  300.     </out:otherwise>
  301. </out:choose>
  302. <out:value-of select="ddwrt:NameChanged('',1)"/>
  303. </select>
  304. </out:if>
  305. </out:template>
  306.  
  307. <!-- generic template to display a filter field option tag -->
  308. <out:template name="dvt.filteroption">
  309. <out:param name="name"/>
  310. <out:param name="value"/>
  311. <out:param name="type"/>
  312. <out:if test="not(starts-with($type,'date')) or ddwrt:NameChanged($value,1)">
  313. <out:variable name="output">
  314.   <out:choose>
  315.     <out:when test="$type = 'number'">
  316.       <out:value-of select="format-number($value,'{$DefaultNumberFormat}')"/>
  317.     </out:when>
  318.     <out:when test="starts-with($type,'number|')">
  319.       <out:variable name="spec" select="substring-after($type,'|')" />
  320.       <out:choose>
  321.         <out:when test="contains($spec, 'lcid')">
  322.             <out:variable name="apos">'</out:variable>
  323.             <out:variable name="realspec" select="substring-after($spec, $apos)"/>
  324.             <out:variable name="formatspec" select="substring-before($realspec, $apos)"/>
  325.             <out:variable name="formatspec2" select="substring-after($realspec, $apos)"/>
  326.             <out:variable name="lcid" select="normalize-space(substring-after($formatspec2, ','))"/>
  327.             <out:value-of select="format-number($value,string($formatspec), substring($lcid,2,string-length($lcid)-2))"/>
  328.         </out:when>
  329.         <out:otherwise>
  330.             <out:value-of select="format-number($value,substring($spec,2,string-length($spec)-2))"/>        
  331.         </out:otherwise>
  332.       </out:choose>
  333.     </out:when>
  334.     <out:when test="starts-with($type,'date')">
  335.       <!-- don't show time portion when formatting; use long date-only format -->
  336.       <out:value-of select="ddwrt:FormatDate(string($value),{$DefaultLCID},3)"/>
  337.     </out:when>
  338.     <out:otherwise>
  339.       <out:value-of select="$value"/>
  340.     </out:otherwise>
  341.   </out:choose>
  342. </out:variable>
  343. <option>
  344.   <out:attribute name="value">
  345.     <out:value-of select="ddwrt:ConnEncode(normalize-space($value))" />
  346.   </out:attribute>
  347.   <out:if test="$dvt_filterfield=$name and $dvt_filterval=normalize-space($value) and $dvt_filterval!=''">
  348.     <out:attribute name="selected">true</out:attribute>
  349.   </out:if>
  350.   <out:choose>
  351.     <out:when test="string-length($output) > 40">
  352.       <out:value-of select="substring($output, 1, 40)"/> ...
  353.     </out:when>
  354.     <out:otherwise>
  355.       <out:value-of select="$output"/>
  356.     </out:otherwise>
  357.   </out:choose>
  358. </option>
  359. </out:if>
  360. </out:template>
  361.  
  362. </xsl:template>
  363.  
  364. <xsl:template match="Style">
  365.  
  366.     <!-- output all the templates -->
  367.  
  368.     <xsl:apply-templates select="Main" />
  369.     <xsl:call-template name="GenHeader" />
  370.     <xsl:apply-templates select="Body" />
  371.     <xsl:call-template name="GenFooter" />
  372.     <xsl:call-template name="GenSummary" />
  373.     <xsl:call-template name="GenEmpty" />
  374.     <xsl:apply-templates select="GroupHeader" />
  375.     <xsl:apply-templates select="GroupFooter" />
  376.  
  377.     <!-- TODO: shouldn't generate these in a TopLevel template -->
  378.     <xsl:call-template name="GenToolbar" />
  379.     <xsl:call-template name="GenNavigation" />
  380.  
  381. </xsl:template>
  382.  
  383. <xsl:template name="gen-field-value">
  384.     <xsl:param name="xpath" />
  385.     <xsl:param name="title" />
  386.     <xsl:param name="type" />
  387.     <xsl:param name="rich" />
  388.  
  389.     <xsl:choose>
  390.  
  391.         <!-- field Type="Note", a.k.a. rich text -->
  392.         <xsl:when test="$type='Note'"> 
  393.             <xsl:choose>
  394.                 <xsl:when test="$rich='0'">
  395.                     <out:value-of select="{$xpath}" />
  396.                 </xsl:when>
  397.                 <xsl:otherwise>
  398.                     <out:value-of select="{$xpath}" disable-output-escaping="yes"/>
  399.                 </xsl:otherwise>
  400.             </xsl:choose>
  401.         </xsl:when>
  402.  
  403.         <!-- field Type="Boolean", a.k.a. yes/no -->
  404.         <xsl:when test="$type='Boolean'">
  405.             <out:choose>
  406.                 <out:when test="{$xpath}='1' or {$xpath}='Yes'">
  407.                     <xsl:value-of select="$YesText"/>
  408.                 </out:when>
  409.                 <out:otherwise>
  410.                     <xsl:value-of select="$NoText"/>
  411.                 </out:otherwise>
  412.             </out:choose>
  413.         </xsl:when>
  414.  
  415.         <!-- field Type="URL", Format="Hyperlink" -->
  416.         <xsl:when test="$type='Hyperlink'">
  417.             <a>
  418.                 <xsl:attribute name="href">{substring-before(<xsl:value-of select="$xpath"/>, ', ')}</xsl:attribute>
  419.                 <out:value-of select="substring-after({$xpath}, ', ')"/>
  420.             </a>
  421.         </xsl:when>
  422.  
  423.         <!-- field Type="URL", Format="Image" -->
  424.         <xsl:when test="$type='Image'">
  425.             <img border="0">
  426.                 <out:attribute name="src"><out:value-of select="substring-before({$xpath}, ', ')"/></out:attribute>
  427.                 <out:attribute name="alt"><out:value-of select="substring-after({$xpath}, ', ')"/></out:attribute>
  428.             </img>
  429.         </xsl:when>
  430.  
  431.         <!-- field Type="Lookup", List="Docs", ShowField="FullUrl" -->
  432.         <xsl:when test="$type='DocHyperlink'">
  433.             <a>
  434.                 <out:attribute name="href"><out:value-of select="{$xpath}"/></out:attribute>
  435.                 <out:value-of select="{$xpath}"/>
  436.             </a>
  437.         </xsl:when>
  438.  
  439.         <!-- field Type="Lookup", List="Docs", ShowField="FullUrl" -->
  440.         <xsl:when test="$type='DocImage'">
  441.             <img border="0">
  442.                 <out:attribute name="src"><out:value-of select="{$xpath}"/></out:attribute>
  443.                 <out:attribute name="alt"><out:value-of select="{$xpath}"/></out:attribute>
  444.             </img>
  445.         </xsl:when>
  446.  
  447.         <!-- this indicates the field is actually a subview -->
  448.         <xsl:when test="$type='view'">
  449.             <out:call-template name="{$xpath}"/>
  450.         </xsl:when>
  451.  
  452.         <!-- view regen: expanded types for "number" -->
  453.         <xsl:when test="substring-before($type,'|')='number'">
  454.             <out:value-of select="format-number({$xpath},{substring-after($type,'|')})"/>
  455.         </xsl:when>
  456.  
  457.         <!-- view regen: default for "number" type -->
  458.         <xsl:when test="$type='number'">
  459.             <out:value-of select="format-number({$xpath},'{$DefaultNumberFormat}')"/>
  460.         </xsl:when>
  461.  
  462.         <!-- view regen: expanded types for "date" -->
  463.         <xsl:when test="substring-before($type,'|')='date'">
  464.             <out:value-of select="ddwrt:FormatDate(string({$xpath}),{substring-after($type,'|')})"/>
  465.         </xsl:when>
  466.  
  467.         <!-- view regen: expanded types for "date" -->
  468.         <xsl:when test="substring-before($type,'|')='datetime'">
  469.             <out:value-of select="ddwrt:FormatDateTime(string({$xpath}),{substring-after($type,'|')})"/>
  470.         </xsl:when>
  471.  
  472.         <!-- view regen: default for "date" type -->
  473.         <xsl:when test="$type='date' or $type='datetime'">
  474.             <out:value-of select="ddwrt:FormatDate({$xpath},{$DefaultLCID},{$DefaultDateFormat})"/>
  475.         </xsl:when>
  476.  
  477.         <!-- the default: just use a plain old xsl:value-of tag -->
  478.         <xsl:otherwise>
  479.             <out:value-of select="{$xpath}"/>
  480.         </xsl:otherwise>
  481.  
  482.     </xsl:choose>
  483.     
  484. </xsl:template>
  485.  
  486. <xsl:template name="gen-param">
  487.     <out:param name="{@Name}">
  488.         <xsl:value-of select="@Default"/>
  489.     </out:param>
  490. </xsl:template>
  491.  
  492. <xsl:template match="Main">
  493.     <!-- this is the root template for the DVT -->
  494.     <out:template name="{$basename}">
  495.         <xsl:for-each select="$Style/Params/Param">
  496.             <xsl:call-template name="gen-param" />
  497.         </xsl:for-each>
  498.         <out:variable name="StyleName"><xsl:value-of select="$StyleName" /></out:variable>
  499.         <xsl:if test="$DoXSLJoin = '1'">
  500.             <out:variable name="dvt_ParentRow">
  501.                 <xsl:attribute name="select">current()</xsl:attribute>
  502.             </out:variable>
  503.         </xsl:if>                
  504.         <out:variable name="Rows" select="{$View/RowPath}" />
  505.         <out:variable name="RowCount" select="count($Rows)"/>
  506.         <out:variable name="IsEmpty" select="$RowCount = 0" />
  507.  
  508.         <!-- TODO: shouldn't generate these in a TopLevel template -->
  509.         <xsl:if test="$ShowToolbar = '1'">
  510.             <out:call-template name="{$basename}.toolbar">
  511.                 <out:with-param name="Rows" select="$Rows" />
  512.             </out:call-template>
  513.         </xsl:if>
  514.  
  515.         <out:choose>
  516.             <out:when test="$IsEmpty">
  517.                 <out:call-template name="{$basename}.empty" />
  518.             </out:when>
  519.             <out:otherwise>
  520.                 <xsl:apply-templates />
  521.             </out:otherwise>
  522.         </out:choose>
  523.  
  524.     </out:template>
  525. </xsl:template>
  526.  
  527. <xsl:template match="Header">
  528.     <out:template name="{$basename}.header">
  529.         <out:param name="Rows"/>
  530.         <xsl:apply-templates />
  531.     </out:template>
  532. </xsl:template>
  533.  
  534. <xsl:template match="Body">
  535.     <out:template name="{$basename}.body">
  536.         <out:param name="Rows"/>
  537.         <out:param name="FirstRow"/>
  538.         <out:param name="LastRow"/>
  539.         <xsl:if test="$DoXSLJoin = '1'">
  540.             <out:param name="dvt_ParentRow"/>
  541.         </xsl:if>                
  542.  
  543.         <out:for-each select="$Rows">
  544.         <out:variable name="KeepItemsTogether" select="false()" />
  545.         <out:variable name="HideGroupDetail" select="false()" />
  546.         <out:variable name="GroupStyle" select="'auto'" />
  547.  
  548.             <out:if>
  549.                 <xsl:attribute name="test">
  550.                     <xsl:choose>
  551.                         <xsl:when test="$DoXSLPaging = '1'">(position() >= $FirstRow and position() <= $LastRow) or $KeepItemsTogether</xsl:when>
  552.                         <xsl:otherwise>true()</xsl:otherwise>
  553.                     </xsl:choose>
  554.                 </xsl:attribute>
  555.  
  556.                 <out:if test="not($HideGroupDetail)" ddwrt:cf_ignore="1">
  557.  
  558.                 <!-- calls to .groupheader template go here -->
  559.  
  560.                 <xsl:apply-templates />
  561.  
  562.                 <!-- calls to .groupfooter template go here -->
  563.  
  564.                 </out:if>
  565.  
  566.             </out:if>
  567.         </out:for-each>
  568.  
  569.     </out:template>
  570. </xsl:template>
  571.  
  572. <xsl:template match="Footer">
  573.     <out:template name="{$basename}.footer">
  574.         <out:param name="Rows"/>
  575.         <xsl:apply-templates />
  576.     </out:template>
  577. </xsl:template>
  578.  
  579. <xsl:template match="Summary">
  580.     <out:template name="{$basename}.summary">
  581.         <out:param name="Rows" />
  582.         
  583.         <xsl:apply-templates />
  584.     </out:template>
  585. </xsl:template>
  586.  
  587. <xsl:template match="Empty">
  588.     <out:template name="{$basename}.empty">
  589.         <out:variable name="ViewEmptyText">
  590.             <xsl:value-of select="$ViewEmptyText" />
  591.         </out:variable>
  592.         <xsl:apply-templates />
  593.     </out:template>
  594. </xsl:template>
  595.  
  596. <xsl:template match="Toolbar">
  597.     <out:template name="{$basename}.toolbar">
  598.         <out:param name="Rows" />
  599.         <xsl:apply-templates />
  600.     </out:template>
  601. </xsl:template>
  602.  
  603. <xsl:template match="Navigation">
  604.     <out:template name="{$basename}.navigation">
  605.         <out:param name="FirstRow"/>
  606.         <out:param name="LastRow"/>
  607.         <out:param name="RowLimit"/>
  608.         <out:param name="RowCount"/>
  609.         <out:param name="RealLastRow"/>
  610.         
  611.         <out:variable name="PrevRow">
  612.             <out:choose>
  613.                 <out:when test="$FirstRow - $RowLimit < 1">1</out:when>
  614.                 <out:otherwise>
  615.                     <out:value-of select="$FirstRow - $RowLimit"/>
  616.                 </out:otherwise>
  617.             </out:choose>
  618.         </out:variable>
  619.         <xsl:apply-templates />
  620.     </out:template>
  621. </xsl:template>
  622.  
  623. <xsl:template match="GroupHeader">
  624.     <out:template name="{$basename}.groupheader">
  625.         <out:param name="fieldtitle"/>
  626.         <out:param name="fieldname"/>
  627.         <out:param name="fieldvalue"/>
  628.         <out:param name="fieldtype"/>
  629.         <out:param name="nodeset"/>
  630.         <out:param name="groupid"/>
  631.         <out:param name="displaystyle"/>
  632.         <out:param name="imagesrc"/>
  633.         <out:param name="alttext"/>
  634.         <out:param name="altname"/>
  635.         <out:param name="hidedetail"/>
  636.         <out:param name="showheader"/>
  637.         <out:param name="showheadercolumn"/>
  638.         <xsl:apply-templates />
  639.     </out:template>
  640. </xsl:template>
  641.  
  642. <xsl:template match="GroupFooter">
  643.     <out:template name="{$basename}.groupfooter">
  644.         <out:param name="fieldtitle"/>
  645.         <out:param name="fieldname"/>
  646.         <out:param name="fieldvalue"/>
  647.         <out:param name="fieldtype"/>
  648.         <out:param name="nodeset"/>
  649.         <out:param name="groupid"/>
  650.         <out:param name="displaystyle"/>
  651.         <out:param name="showfooter"/>
  652.         <out:param name="showfootercolumn"/>        
  653.         <xsl:apply-templates />
  654.     </out:template>
  655. </xsl:template>
  656.  
  657. <!-- templates to generate default parts of views -->
  658.  
  659. <xsl:template name="GenEmpty">
  660.     <xsl:choose>
  661.         <xsl:when test="Empty">
  662.             <xsl:apply-templates select="Empty" />
  663.         </xsl:when>
  664.         <xsl:otherwise>
  665.             <xsl:apply-templates select="msxsl:node-set($Defaults)/Empty" />
  666.         </xsl:otherwise>
  667.     </xsl:choose>
  668. </xsl:template>
  669.  
  670. <xsl:template name="GenHeader">
  671.     <xsl:choose>
  672.         <xsl:when test="Header">
  673.             <xsl:apply-templates select="Header" />
  674.         </xsl:when>
  675.         <xsl:otherwise>
  676.             <xsl:apply-templates select="msxsl:node-set($Defaults)/Header" />
  677.         </xsl:otherwise>
  678.     </xsl:choose>
  679. </xsl:template>
  680.  
  681. <xsl:template name="GenFooter">
  682.     <xsl:choose>
  683.         <xsl:when test="Footer">
  684.             <xsl:apply-templates select="Footer" />
  685.         </xsl:when>
  686.         <xsl:otherwise>
  687.             <xsl:apply-templates select="msxsl:node-set($Defaults)/Footer" />
  688.         </xsl:otherwise>
  689.     </xsl:choose>
  690. </xsl:template>
  691.  
  692. <xsl:template name="GenSummary">
  693.     <xsl:choose>
  694.         <xsl:when test="Summary">
  695.             <xsl:apply-templates select="Summary" />
  696.         </xsl:when>
  697.         <xsl:otherwise>
  698.             <xsl:apply-templates select="msxsl:node-set($Defaults)/Summary" />
  699.         </xsl:otherwise>
  700.     </xsl:choose>
  701. </xsl:template>
  702.  
  703. <xsl:template name="GenToolbar">
  704.     <xsl:choose>
  705.         <xsl:when test="Toolbar">
  706.             <xsl:apply-templates select="Toolbar" />
  707.         </xsl:when>
  708.         <xsl:otherwise>
  709.             <xsl:apply-templates select="msxsl:node-set($Defaults)/Toolbar" />
  710.         </xsl:otherwise>
  711.     </xsl:choose>
  712. </xsl:template>
  713.  
  714. <xsl:template name="GenNavigation">
  715.     <xsl:choose>
  716.         <xsl:when test="Navigation">
  717.             <xsl:apply-templates select="Navigation" />
  718.         </xsl:when>
  719.         <xsl:otherwise>
  720.             <xsl:apply-templates select="msxsl:node-set($Defaults)/Navigation" />
  721.         </xsl:otherwise>
  722.     </xsl:choose>
  723. </xsl:template>
  724.  
  725. <!-- implement the known tags in the "dvt" namespace -->
  726.  
  727. <!-- this tag only works in Navigation template -->
  728. <xsl:template match="dvt_PrevLink">
  729.     <!-- DSP paging does not support previous; use browser history link instead -->
  730.     <!-- if we are doing xsl paging, then we can simply pass the firstrow value -->
  731.     <a>
  732.         <out:attribute name="href"><xsl:choose>
  733.             <xsl:when test="not($DoXSLPaging = '1')">javascript: history.back();</xsl:when>
  734.             <xsl:otherwise>javascript: <out:value-of select="ddwrt:GenFireServerEvent(concat('dvt_firstrow={{',$PrevRow,'}}'))" />;</xsl:otherwise>
  735.         </xsl:choose></out:attribute>
  736.         <xsl:value-of select="$PreviousLinkText"/>
  737.     </a>
  738. </xsl:template>
  739.  
  740. <!-- this tag only works in Navigation template -->
  741. <xsl:template match="dvt_NextLink">
  742.     <!-- if we are doing DSP paging, then we have to pass the dvt_nextpagedata back as the StartPosition -->
  743.     <!-- if we are doing xsl paging, then we can simply pass the firstrow value -->
  744.     <out:if test="$LastRowValue < $RowCount or string-length($dvt_nextpagedata)!=0" ddwrt:cf_ignore="1">
  745.         <a>
  746.             <out:attribute name="href"><xsl:choose>
  747.                 <xsl:when test="not($DoXSLPaging = '1')">javascript: <out:value-of select="ddwrt:GenFireServerEvent(concat('dvt_firstrow={{',$NextRow,'}};StartPosition={{',$dvt_nextpagedata,'}}'))" />;</xsl:when>
  748.                 <xsl:otherwise>javascript: <out:value-of select="ddwrt:GenFireServerEvent(concat('dvt_firstrow={{',$NextRow,'}}'))" />;</xsl:otherwise>
  749.             </xsl:choose></out:attribute>
  750.             <xsl:value-of select="$NextLinkText"/>
  751.         </a>
  752.     </out:if>
  753. </xsl:template>
  754.  
  755. <!-- this tag only works in Navigation template -->
  756. <xsl:template match="dvt_FirstLink">
  757.     <a>
  758.     <out:attribute name="href">
  759.     <xsl:choose>
  760.     <!-- if we are doing DSP paging, then we have to pass the firstrow and the StartPosition -->
  761.     <xsl:when test="not($DoXSLPaging = '1')">javascript: <out:value-of select="ddwrt:GenFireServerEvent('dvt_firstrow={{1}};StartPosition={{}}')" />;</xsl:when>
  762.     <!-- if we are doing xsl paging, then we can simply pass the firstrow value -->
  763.     <xsl:otherwise>javascript: <out:value-of select="ddwrt:GenFireServerEvent('dvt_firstrow={{1}}')" />;</xsl:otherwise>
  764.     </xsl:choose>
  765.     </out:attribute>
  766.     <xsl:value-of select="$FirstLinkText"/>
  767.     </a>
  768. </xsl:template>
  769.  
  770. <!-- this tag only works in Navigation template -->
  771. <xsl:template match="dvt_IfNotFirstPage">
  772.     <out:if test="$dvt_firstrow > 1" ddwrt:cf_ignore="1">
  773.         <xsl:apply-templates/>
  774.     </out:if>
  775. </xsl:template>
  776.  
  777. <xsl:template match="dvt_Header">
  778.     <xsl:if test="$ShowHeader = '1'" ddwrt:cf_ignore="1">
  779.         <out:call-template name="{$basename}.header" >
  780.             <out:with-param name="Rows" select="$Rows"/>
  781.         </out:call-template>
  782.     </xsl:if>
  783. </xsl:template>
  784.  
  785. <xsl:template match="dvt_Body">
  786.  
  787.             <out:call-template name="{$basename}.body">
  788.                 <out:with-param name="Rows" select="$Rows" />
  789.                 <out:with-param name="FirstRow" select="1" />
  790.                 <out:with-param name="LastRow" select="$RowCount" />
  791.                 <xsl:if test="$DoXSLJoin = '1'">
  792.                     <out:with-param name="dvt_ParentRow" select="$dvt_ParentRow"/>
  793.                 </xsl:if>        
  794.                                 
  795.             </out:call-template>
  796.  
  797. </xsl:template>
  798.  
  799. <xsl:template match="dvt_Footer">
  800.     <xsl:if test="$ShowFooter = '1'" ddwrt:cf_ignore="1">
  801.         <out:call-template name="{$basename}.footer">
  802.             <out:with-param name="Rows" select="$Rows"/>
  803.         </out:call-template>
  804.     </xsl:if>
  805. </xsl:template>
  806.  
  807. <xsl:template match="dvt_Field[@Name]">
  808.     <xsl:variable name="ThisField" select="$View/Fields/Field[@FName=current()/@Name]"/>
  809.  
  810.     <xsl:call-template name="gen-field-value">
  811.         <xsl:with-param name="xpath" select="$ThisField/@Value" />
  812.         <xsl:with-param name="title" select="$ThisField/@Title" />
  813.         <xsl:with-param name="type" select="$ThisField/@Type" />
  814.         <xsl:with-param name="rich" select="$ThisField/@Rich" />
  815.     </xsl:call-template>
  816.  
  817. </xsl:template>
  818.  
  819. <xsl:template match="dvt_Field">
  820.     <xsl:param name="ThisField"/>
  821.  
  822.     <xsl:call-template name="gen-field-value">
  823.         <xsl:with-param name="xpath" select="$ThisField/@Value" />
  824.         <xsl:with-param name="title" select="$ThisField/@Title" />
  825.         <xsl:with-param name="type" select="$ThisField/@Type" />
  826.         <xsl:with-param name="rich" select="$ThisField/@Rich" />
  827.     </xsl:call-template>
  828.  
  829. </xsl:template>
  830.  
  831. <xsl:template match="dvt_FieldTitle[@Name]">
  832.     <xsl:variable name="ThisField" select="$View/Fields/Field[@FName=current()/@Name]"/>
  833.     <xsl:value-of select="$ThisField/@Title" />
  834. </xsl:template>
  835.  
  836. <xsl:template match="dvt_FieldTitle">
  837.     <xsl:param name="ThisField"/>
  838.     <xsl:value-of select="$ThisField/@Title" />
  839. </xsl:template>
  840.  
  841. <xsl:template match="dvt_FieldHeader[@Name]">
  842.     <xsl:variable name="ThisField" select="$View/Fields/Field[@FName=current()/@Name]"/>
  843.     <out:variable name="{$ThisField/@FName}">
  844.         <out:call-template name="dvt.headerfield">
  845.             <out:with-param name="fieldname">
  846.                 <xsl:value-of select="$ThisField/@Value"/>
  847.             </out:with-param>
  848.             <out:with-param name="fieldtitle">
  849.                 <xsl:value-of select="$ThisField/@Title"/>
  850.             </out:with-param>
  851.             <out:with-param name="Rows" select="$Rows"/>            
  852.         </out:call-template>
  853.     </out:variable>
  854.     <out:copy-of select="${$ThisField/@FName}" />
  855. </xsl:template>
  856.  
  857. <xsl:template match="dvt_FieldHeader">
  858.     <xsl:param name="ThisField"/>
  859.     <out:variable name="{$ThisField/@FName}">
  860.         <out:call-template name="dvt.headerfield">
  861.             <out:with-param name="fieldname">
  862.                 <xsl:value-of select="$ThisField/@Value"/>
  863.             </out:with-param>
  864.             <out:with-param name="fieldtitle">
  865.                 <xsl:value-of select="$ThisField/@Title"/>
  866.             </out:with-param>
  867.             <out:with-param name="Rows" select="$Rows"/>            
  868.         </out:call-template>
  869.     </out:variable>
  870.     <out:copy-of select="${$ThisField/@FName}" />
  871. </xsl:template>
  872.  
  873. <xsl:template match="dvt_FieldFilter">
  874.     <xsl:param name="ThisField"/>
  875.  
  876.         <out:call-template name="dvt.filterfield">
  877.             <out:with-param name="fieldname">
  878.                 <!-- Remove synthetized ddw prefixes used for default namespaces when calling into the dvt.filterfield template. -->
  879.                 <xsl:choose>
  880.                     <xsl:when test="contains($ThisField/@Value, ':') and starts-with($ThisField/@Value, 'ddw')">
  881.                         <xsl:value-of select="substring-after($ThisField/@Value, ':')"/>
  882.                     </xsl:when>
  883.                     <xsl:otherwise>
  884.                         <xsl:value-of select="$ThisField/@Value"/>
  885.                     </xsl:otherwise>
  886.                 </xsl:choose>
  887.             </out:with-param>
  888.             <out:with-param name="fieldtitle">
  889.                 <!-- Remove synthetized ddw prefixes used for default namespaces when calling into the dvt.filterfield template. -->
  890.                 <xsl:choose>
  891.                     <xsl:when test="contains($ThisField/@Title, ':') and starts-with($ThisField/@Title, 'ddw')">
  892.                         <xsl:value-of select="substring-after($ThisField/@Title, ':')"/>
  893.                     </xsl:when>
  894.                     <xsl:otherwise>
  895.                         <xsl:value-of select="$ThisField/@Title"/>
  896.                     </xsl:otherwise>
  897.                 </xsl:choose>
  898.             </out:with-param>
  899.             <out:with-param name="Rows" select="$Rows"/>
  900.             <out:with-param name="fieldtype">
  901.                 <xsl:value-of select="$ThisField/@Type"/>
  902.             </out:with-param>
  903.         </out:call-template>
  904.  
  905. </xsl:template>
  906.  
  907. <xsl:template match="dvt_FieldFilter[@Name]">
  908.     <xsl:variable name="ThisField" select="$View/Fields/Field[@FName=current()/@Name]"/>
  909.  
  910.         <out:call-template name="dvt.filterfield">
  911.             <out:with-param name="fieldname">
  912.                 <xsl:value-of select="$ThisField/@Value"/>
  913.             </out:with-param>
  914.             <out:with-param name="fieldtitle">
  915.                 <xsl:value-of select="$ThisField/@Title"/>
  916.             </out:with-param>
  917.             <out:with-param name="Rows" select="$Rows"/>
  918.             <out:with-param name="fieldtype">
  919.                 <xsl:value-of select="$ThisField/@Type"/>
  920.             </out:with-param>
  921.         </out:call-template>
  922.  
  923. </xsl:template>
  924.  
  925. <xsl:template match="dvt_ForEachField">
  926.     <xsl:variable name="CurNode" select="."/>
  927.     <xsl:variable name="ReqFields">
  928.         <xsl:if test="@ExcludeRequired">
  929.         <xsl:for-each select="$Style/RequiredFields/Field">
  930.             <xsl:text> </xsl:text>
  931.             <xsl:value-of select="@Name"/>
  932.             <xsl:text> </xsl:text>
  933.         </xsl:for-each>
  934.         </xsl:if>
  935.     </xsl:variable>
  936.     <xsl:for-each select="$View/Fields/Field[not(@Hidden) and not(contains($ReqFields,concat(' ',@FName,' ')))]">
  937.         <xsl:variable name="ThisField" select="."/>
  938.         <xsl:variable name="FieldNum" select="position()"/>
  939.         <xsl:apply-templates select="$CurNode/node()">
  940.             <xsl:with-param name="ThisField" select="$ThisField"/>
  941.             <xsl:with-param name="FieldNum" select="$FieldNum"/>
  942.         </xsl:apply-templates>
  943.     </xsl:for-each>
  944. </xsl:template>
  945.  
  946. <xsl:template match="dvt_ForEachRow">
  947.     <out:for-each select="{$View/RowPath}">
  948.         <xsl:apply-templates select="node()"/>
  949.     </out:for-each>
  950. </xsl:template>
  951.  
  952. <xsl:template match="dvt_IfNotEmpty">
  953.     <out:if test="count({$View/RowPath})!=0">
  954.         <xsl:apply-templates/>
  955.     </out:if>
  956. </xsl:template>
  957.  
  958. <xsl:template match="dvt_IfEmpty">
  959.     <out:if test="count({$View/RowPath})=0">
  960.         <xsl:apply-templates/>
  961.     </out:if>
  962. </xsl:template>
  963.  
  964. <xsl:template match="dvt_IfNewGroup">
  965.     <xsl:if test="$View/Sorting[@Grouping='TRUE']">
  966.         <out:if test="$NewGroup = 'TRUE'" ddwrt:cf_ignore="1">
  967.             <xsl:apply-templates>
  968.                 <xsl:with-param name="ThisField" select="$View/Fields/Field[@FName=$View/Sorting/SortBy[1]/@Field]"/>
  969.             </xsl:apply-templates>
  970.         </out:if>
  971.     </xsl:if>
  972. </xsl:template>
  973.  
  974. <xsl:template match="dvt_IfEvenRow">
  975.     <out:if test="position() mod 2 = 0" ddwrt:cf_ignore="1">
  976.         <xsl:apply-templates/>
  977.     </out:if>
  978. </xsl:template>
  979.  
  980. <xsl:template match="dvt_IfOddRow">
  981.     <out:if test="position() mod 2 != 0" ddwrt:cf_ignore="1">
  982.         <xsl:apply-templates/>
  983.     </out:if>
  984. </xsl:template>
  985.  
  986. <xsl:template match="dvt_IfFirstRow">
  987.     <out:if test="position() = 1" ddwrt:cf_ignore="1">
  988.         <xsl:apply-templates/>
  989.     </out:if>
  990. </xsl:template>
  991.  
  992. <xsl:template match="dvt_IfLastRow">
  993.     <out:if test="position() = last()" ddwrt:cf_ignore="1">
  994.         <xsl:apply-templates/>
  995.     </out:if>
  996. </xsl:template>
  997.  
  998. <xsl:template match="dvt_IfNotFirstRow">
  999.     <out:if test="position() != 1" ddwrt:cf_ignore="1">
  1000.         <xsl:apply-templates/>
  1001.     </out:if>
  1002. </xsl:template>
  1003.  
  1004. <xsl:template match="dvt_IfNotLastRow">
  1005.     <out:if test="position() != last()" ddwrt:cf_ignore="1">
  1006.         <xsl:apply-templates/>
  1007.     </out:if>
  1008. </xsl:template>
  1009.  
  1010. <xsl:template match="dvt_IfFirstField">
  1011.     <xsl:param name="FieldNum"/>
  1012.     <xsl:if test="$FieldNum = 1" ddwrt:cf_ignore="1">
  1013.         <xsl:apply-templates/>
  1014.     </xsl:if>
  1015. </xsl:template>
  1016.  
  1017. <xsl:template match="dvt_IfNotFirstField">
  1018.     <xsl:param name="FieldNum"/>
  1019.     <xsl:if test="$FieldNum != 1" ddwrt:cf_ignore="1">
  1020.         <xsl:apply-templates/>
  1021.     </xsl:if>
  1022. </xsl:template>
  1023.  
  1024. <xsl:template match="dvt_IfVarEq">
  1025.     <out:if test="${@name} = '{@value}'" ddwrt:cf_ignore="1">
  1026.         <xsl:apply-templates/>
  1027.     </out:if>
  1028. </xsl:template>
  1029.  
  1030. <xsl:template match="dvt_HTML"><out:text disable-output-escaping="yes"><xsl:apply-templates/></out:text></xsl:template>
  1031.  
  1032. <xsl:template match="dvt_NBSP"><out:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&nbsp;</out:text></xsl:template>
  1033.  
  1034. <xsl:template match="dvt_Comment"><out:comment><xsl:apply-templates/></out:comment></xsl:template>
  1035.  
  1036. <xsl:template match="dvt_GetVar">
  1037.     <out:value-of select="${@Name}"/>
  1038. </xsl:template>
  1039.  
  1040. <xsl:template match="dvt_ShowVar">
  1041.     <out:value-of select="{@Name}"/>
  1042. </xsl:template>
  1043.  
  1044. <xsl:template match="dvt_DisplayVar">
  1045.     <out:value-of select="${@Name}" disable-output-escaping="yes"/>
  1046. </xsl:template>
  1047.  
  1048. <xsl:template match="dvt_ChooseText">
  1049.     <xsl:value-of select="$ChooseText"/>
  1050. </xsl:template>
  1051.  
  1052. <xsl:template match="dvt_PageItemsText">
  1053.     <xsl:value-of select="$PageItemsText" disable-output-escaping="yes"/>
  1054. </xsl:template>
  1055.  
  1056. <xsl:template match="dvt_CountText">
  1057.     <xsl:value-of select="$CountText" disable-output-escaping="yes"/>
  1058. </xsl:template>
  1059.  
  1060. <xsl:template match="*">
  1061.     <xsl:param name="ThisField"/>
  1062.     <xsl:copy>
  1063.         <xsl:copy-of select="@*"/>
  1064.         <xsl:apply-templates>
  1065.             <xsl:with-param name="ThisField" select="$ThisField"/>
  1066.         </xsl:apply-templates>
  1067.     </xsl:copy>
  1068. </xsl:template>
  1069.  
  1070. </xsl:stylesheet>
  1071.  
  1072.  
  1073.  
  1074.